The diesel can fail for many reasons. It doesn't necessarily have to be a major engine failure - a broken shift cable, a clogged filter, and it's already necessary to sail into harbour under sail
But many skippers get anxious just thinking about it: narrow pit lanes, expensive yachts as potential collision opponents and possibly a leeward wall situation. What gets many people's pulses racing under normal circumstances quickly turns into stress when the wind is the only driving force.
That doesn't have to be the case. If you practise beforehand, you can enter the harbour calmly under jib or main. It is not even necessary to actually practise in the marina: a few fenders or the dinghy on an anchor serve as an excellent sparring partner on open water to assess distances and develop a feel for your own vessel.
Incidentally, this does not only apply to owners; charter skippers should also practise this manoeuvre, especially as the crew is usually not as well-rehearsed as on board their own yacht anyway. In the new YACHT, you will find detailed descriptions and clear illustrations of the possibilities and tricks for arriving safely.